const routes=[
    {
        name:'home',
        path:'/home',
        component:()=>import('@/pages/Home'),
        meta:{
            isShowNav:true
        }
    },{
        name:'login',
        path:'/login',
        component:()=>import('@/pages/Login'),
        meta:{
            // 是否隐藏底部
            isHiddenFooter:true
        }
    },{
        name:'register',
        path:'/register',
        component:()=>import('@/pages/Register'),
        meta:{
            // 是否隐藏底部
            isHiddenFooter:true
        }
    },{
        name:'search',
        // path:'/search', // query传参
        path:'/search/:keyword?', // params 参数需要用 ？ 添加一个占位 代表这个参数可有可无 不会覆盖前面的search
        component:()=>import('@/pages/Search'),
    },{
        name:'detail',
        path:'/detail/:id',
        component:()=>import('@/pages/Detail'),
        props:true // 在组件内就可使用props的方式接收params参数
    },{
       name:'addCartSuccess',
       path:'/addCartSuccess',
       component:()=>import('@/pages/AddCartSuccess'),
    },{
        name:'shopCart',
        path:'/shopCart',
        component:()=>import('@/pages/ShopCart'),
    },{
        name:'trade',
        path:'/trade',
        component:()=>import('@/pages/Trade'),
    },{
        name:'pay',
        path:"/pay",
        component:()=>import('@/pages/Pay'),
    },{
        name:'paysuccess',
        path:'/paysuccess',
        component:()=>import('@/pages/PaySuccess'),
    },{
        name:'center',
        path:'/center',
        component:()=>import('@/pages/Center'),
    },{
        path:'/',
        redirect:'/home'
    }
]; 


export default routes